package com.eclab.security;

import org.springframework.social.connect.Connection;
import org.springframework.social.connect.ConnectionSignUp;
import org.springframework.social.security.SocialAuthenticationProvider;
import org.springframework.stereotype.Component;

/**
 * 描述:
 * 自动注册用户信息
 * @author yd
 * @create 2019-02-12 14:06
 */
//@Component
public class DemoConnectionSignUp implements ConnectionSignUp{


    @Override
    public String execute(Connection<?> connection) {
        //根据社交用户信息默认创建用户并返回用户唯一标识
        return connection.getDisplayName();
    }
}